package com.wjpeng.wms.mapper;

import com.wjpeng.wms.domain.Role;
import com.wjpeng.wms.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    List<Role> queryLimit(QueryObject qo);

    Integer queryCount(QueryObject qo);

    void insertReation(@Param("roleId") Long roleId,@Param("permissionId") Long permissionId);

    void deleteReation(Long id);

    void deleteMenusReation(Long id);

    void insertMenusReation(@Param("roleId")Long roleId, @Param("menuId")Long menuId);
}